{template header_common}
<link rel="stylesheet" type="text/css" href="/static/css/goods.css">
<div class="area cart">
	<table cellpadding="0" cellspacing="0" width="100%" class="cart-header-table">
    	<tr>
        	<td style="text-align:left;"><input type="checkbox" id="checkall1" autocomplete="off">全选</td>
            <td>商品信息</td>
            <td width="120">单价</td>
            <td width="100">数量</td>
            <td width="120">小计</td>
            <td width="120">操作</td>
        </tr>
    </table>
    <form aotucomplete="off">
    {loop $cartlist $shopid $goodslist}
    <div class="goods-item">
    	<table cellpadding="0" cellspacing="0" width="100%" class="goods-shop-table">
            <tr>
                <td>
                	<div class="f-right">满100返50</div>
                	<input type="checkbox" class="shopmark" autocomplete="off" value="$shopid">{$shoplist[$shopid][shopname]}
                </td>
            </tr>
        </table>
        {loop $goodslist $goods}
        <table cellpadding="0" cellspacing="0" width="100%" class="goods-item-table" id="item-$goods[id]">
            <tr>
                <td width="20"><input type="checkbox" class="mark shop_$goods[shopid]" value="$goods[id]" autocomplete="off"></td>
                <td class="td-name">
                	<div class="pic"><img src="{echo image($goods[image])}"></div>
                    <h3 class="name">$goods[name]</h3>
                </td>
                <td width="120" class="amount" id="price_$goods[id]" value="$goods[price]">
                ￥{echo number_format($goods[price], 2);}</td>
                <td width="100">
                	<div class="number">
                		<a onclick="changeNumber($goods[id], 0)">-</a>
                        <input type="text" value="$goods[number]" id="number_$goods[id]" autocomplete="off">
                        <a onclick="changeNumber($goods[id], 1)">+</a>
                	</div>
                </td>
                <td width="120" class="amount" id="total_$goods[id]" value="$goods[total]">
                ￥{echo number_format($goods[total], 2);}</td>
                <td width="120"><a onclick="removeFromCart($goods[id])">移除购物车</a></td>
            </tr>
        </table>
        {/loop}
    </div>
    {/loop}
    
    <div class="cart-bottom-div">
    	<a class="settlement">去结算</a>
        <div class="amount">
        	<p>总价(含运费)：<span id="total_amount">￥100.00</span></p>
            <p>已选购3件商品，共为你节省30元</p>
        </div>
        <div class="checkall"><input type="checkbox" id="checkall2"> 全选 <a>删除选中商品</a></div>
    </div>
    </form>
</div>
<script src="/static/js/cart.js"></script>
{template footer_common}